﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL.Progect
{
  public  class T_PUB_PROJECTMATERIAL
    {
      private readonly DALL.Progect.T_PUB_PROJECTMATERIAL dal = new DALL.Progect.T_PUB_PROJECTMATERIAL();
        public T_PUB_PROJECTMATERIAL()
        { }
        /// <summary>
        /// 项目下的数据
        /// </summary>
        public DataSet GetModelListByPid(string strPID)
        {
            string strWhere = string.Format(" and p.PROJECT_ID='{0}'", strPID);
            return dal.GetPList(strWhere);
        }

        #region  Method
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Model.Progect.T_PUB_PROJECTMATERIAL model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.Progect.T_PUB_PROJECTMATERIAL model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int ID)
        {

            return dal.Delete(ID);
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.Progect.T_PUB_PROJECTMATERIAL GetModel(int ID)
        {

            return dal.GetModel(ID);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<Model.Progect.T_PUB_PROJECTMATERIAL> GetModelList(string strWhere)
        {
            return dal.GetListArray(strWhere);
        }
        /// 获得数据列表
        /// </summary>
        public DataSet GetAllList()
        {
            return GetList("");
        }
        #endregion  Method
    }
}
